﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using DataAnnotationsExtensions;

namespace BenzInfo.Hockey.LHRAF.Models
{
    public class Person
    {
        [Key]
        public int Id { get; set; }

        [Required]
        [StringLength(50, MinimumLength = 2)]
        [Display(Name = "DisplayFirstName", ResourceType = typeof(Resources.Models.Person))]
        public string FirstName { get; set; }

        [Required]
        [StringLength(50, MinimumLength = 2)]
        [Display(Name = "DisplayLastName", ResourceType = typeof(Resources.Models.Person))]
        public string LastName { get; set; }

        [Required]
        public int Position { get; set; }

        [FileExtensions("png|jpg|jpeg|gif")]
        [Display(Name = "DisplayPicture", ResourceType = typeof(Resources.Models.Person))]
        public string Picture { get; set; }

        public string FullName
        {
            get { return string.Format("{0} {1}", FirstName, LastName); }
        }
    }
}